# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataform.V1beta1.Model.GitRemoteSettings do
  @moduledoc """
  Controls Git remote configuration for a repository.

  ## Attributes

  *   `authenticationTokenSecretVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format `projects/*/secrets/*/versions/*`.
  *   `defaultBranch` (*type:* `String.t`, *default:* `nil`) - Required. The Git remote's default branch name.
  *   `sshAuthenticationConfig` (*type:* `GoogleApi.Dataform.V1beta1.Model.SshAuthenticationConfig.t`, *default:* `nil`) - Optional. Authentication fields for remote uris using SSH protocol.
  *   `tokenStatus` (*type:* `String.t`, *default:* `nil`) - Output only. Deprecated: The field does not contain any token status information. Instead use https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/computeAccessTokenStatus
  *   `url` (*type:* `String.t`, *default:* `nil`) - Required. The Git remote's URL.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :authenticationTokenSecretVersion => String.t() | nil,
          :defaultBranch => String.t() | nil,
          :sshAuthenticationConfig =>
            GoogleApi.Dataform.V1beta1.Model.SshAuthenticationConfig.t() | nil,
          :tokenStatus => String.t() | nil,
          :url => String.t() | nil
        }

  field(:authenticationTokenSecretVersion)
  field(:defaultBranch)
  field(:sshAuthenticationConfig, as: GoogleApi.Dataform.V1beta1.Model.SshAuthenticationConfig)
  field(:tokenStatus)
  field(:url)
end

defimpl Poison.Decoder, for: GoogleApi.Dataform.V1beta1.Model.GitRemoteSettings do
  def decode(value, options) do
    GoogleApi.Dataform.V1beta1.Model.GitRemoteSettings.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataform.V1beta1.Model.GitRemoteSettings do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
